﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using BUS;
using DAL;
using DTO;

namespace WEBSITE_BANDEAL.Admin
{
    public partial class donhang_status : System.Web.UI.Page
    {
        DON_HANGBUS dhb = new DON_HANGBUS();
        protected void Page_Load(object sender, EventArgs e)
        {           
            int ma = int.Parse(Request.QueryString["id"]);
            string chuoi = "";
            DON_HANG dh = DON_HANGBUS.GetByID(ma);
            if (dh.TrangThai == 1)
            {
                dh.TrangThai = 0;
                chuoi = "../Template/images/admin/cancel.png";
            }
            else
            {
                dh.TrangThai = 1;
                chuoi = "../Template/images/admin/check.png";
            }
            dhb.DonHang_TrangThai(dh);
            Response.Write(chuoi);
        }
    }
}